import { BaseObjectAmcaxProp, ShowTypeBaseAmcaxProp } from './baseAmcaxProp';

export const StructuralN = {
  parameterUnits: {
    AmcaxProp: {
      childCreatable: false, // 暂时不可添加，后期可能需要添加
    },
    SI: {
      AmcaxProp: {
        nameEditable: false,
        selfEditKey: '',
        deletable: false, // 暂时不可删除，后期可能需要删除
      },
      SI: {
        Label: '单位',
        Type: 'option',
        Options: ['mm,N,t,s'],
        Default: 'mm,N,t,s',
      },
    },
  },
  materials: {
    AmcaxProp: {
      childCreatable: true,
    },
    ABS: {
      AmcaxProp: BaseObjectAmcaxProp,
      YoungsModulus: {
        Type: 'double',
        Default: 1800,
      },
      PoissonsRatio: {
        Type: 'double',
        Default: 0.35,
      },
      Density: {
        Type: 'double',
        Default: 1200,
      },
    },
  },
  properties: {
    AmcaxProp: {
      childCreatable: true,
    },
    Attribute: {
      AmcaxProp: BaseObjectAmcaxProp,
      CardImage: {
        Type: 'option',
        Options: ['SHELL', 'SOLID'],
        Default: 'SHELL',
        EmitChange: true,
      },
      Material: {
        Type: 'materialSet',
      },
      T: {
        HandleChange: {
          CardImage: {
            SHELL: {},
          },
        },
        Type: 'double',
        Default: 10.0,
      },
      AssignTo: {
        Type: 'nextmesh',
      },
    },
  },
  boundaries: {
    AmcaxProp: {
      childCreatable: true,
    },
    Force: {
      AmcaxProp: ShowTypeBaseAmcaxProp,
      AssignTo: {
        Type: 'Node',
      },
      Component: {
        Type: 'Arrayd',
        Default: [0.0, 0.0, 0.0],
      },
    },
    Pressure: {
      AmcaxProp: ShowTypeBaseAmcaxProp,
      AssignTo: {
        Type: 'Surface',
      },
      MagnitudeType: {
        Type: 'option',
        Options: ['Normal', 'Component'],
        Default: 'Normal',
        EmitChange: true,
      },
      Magnitude: {
        HandleChange: {
          MagnitudeType: {
            Normal: {},
          },
        },
        Type: 'double',
        Default: 100.0,
      },
      ForceComponents: {
        HandleChange: {
          MagnitudeType: {
            Component: {},
          },
        },
        Type: 'Arrayd',
        Default: [0.0, 0.0, 0.0],
      },
    },
    Centrifugal: {
      AmcaxProp: ShowTypeBaseAmcaxProp,
      Method: {
        Type: 'option',
        Options: ['velocity', 'acceleration'],
        Default: 'velocity',
      },
      'Rotation center': {
        Type: 'Arrayd',
        Default: [0.0, 0.0, 0.0],
      },
      'Rotation axis': {
        Type: 'Arrayd',
        Default: [0.0, 0.0, 0.0],
      },
      'Angle Velocity': {
        Type: 'double',
        Default: 0.0,
      },
      'Angle Acceleration': {
        Type: 'double',
        Default: 0.0,
      },
    },
    DisplacementConstraint: {
      AmcaxProp: ShowTypeBaseAmcaxProp,
      AssignTo: {
        Type: 'Node',
      },
      DOF: {
        Type: 'ArrayUnoindNoTitle',
        Default: [
          { isPrescribed: false, value: 0.0 },
          { isPrescribed: false, value: 0.0 },
          { isPrescribed: false, value: 0.0 },
          { isPrescribed: false, value: 0.0 },
          { isPrescribed: false, value: 0.0 },
          { isPrescribed: false, value: 0.0 },
        ],
      },
    },
    Moment: {
      AmcaxProp: ShowTypeBaseAmcaxProp,
      AssignTo: {
        Type: 'Node',
      },
      Component: {
        Type: 'Arrayd',
        Default: [0.0, 0.0, 0.0],
      },
    },
    Acceleration: {
      AmcaxProp: ShowTypeBaseAmcaxProp,
      AssignTo: {
        Type: 'Node',
      },
      Component: {
        Type: 'Arrayd',
        Default: [0.0, 0.0, 0.0],
      },
    },
    Grav: {
      AmcaxProp: ShowTypeBaseAmcaxProp,
      Component: {
        Type: 'Arrayd',
        Default: [0.0, 0.0, 0.0],
      },
    },
  },
  solver: {
    AmcaxProp: {
      childCreatable: true,
    },
    Static: {
      AmcaxProp: BaseObjectAmcaxProp,
      AnalysisType: {
        Type: 'option',
        Options: ['Linear Static'],
        Default: 'Linear Static',
      },
      SPC: {
        Type: 'Boundary-DisplacementConstraint',
      },
      Load: {
        Type: 'Boundary-Load',
      },
    },
  },
};
